/************************* 版权声明 *********************************
 * 
 * 版权所有：Apache License 2.0
 * 
 ************************* 版本声明 *********************************
 *@since jdk1.5
 *@version 0.1
 ************************* 变更记录 *********************************
 *
 * 创建者：bijiqiang Email:bijiqiang@gmail.com   创建日期： 2010-1-5
 * 创建记录：创建类结构。
 * 
 * 修改者：       修改日期：
 * 修改记录：
 *
 * 修改者：       修改日期：
 * 修改记录：
 * ……
 ************************* To  Do *********************************
 *
 * 1、实现所有未实现的方法（抛出UnsupportedOperationException的方法）。
 * 
 ************************* 随   笔 *********************************
 *
 * 
 * 
 ******************************************************************
 */

package com.realgodo.site.entity.site;

import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Lob;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.realgodo.site.entity.IdEntity;

@Entity(name = "Event")
@Table(name = "event_table")
public class Event extends IdEntity {

	private static final long serialVersionUID = -6898117716731565695L;

	private String title;

	private String cover;

	private String content;

	private Date createDate = new Date();

	/** 0-非置顶 ,1-置顶 */
	private int top = 0;
	/** 0-没结束 1-已结束 */
	private int over = 0;

	public static final int TOP_NOT = 0;
	public static final int TOP_YES = 1;
	public static final int OVER_ALL = -1;
	public static final int OVER_NOT = 0;
	public static final int OVER_YES = 1;

	@Column(name = "title")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "cover")
	public String getCover() {
		return cover;
	}

	public void setCover(String cover) {
		this.cover = cover;
	}

	@Lob
	@Basic(fetch = FetchType.LAZY)
	@Column(name = "content", insertable = true, updatable = true)
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "create_date", insertable = true, updatable = true)
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	@Column(name = "top")
	public int getTop() {
		return top;
	}

	public void setTop(int top) {
		this.top = top;
	}

	@Column(name = "over")
	public int getOver() {
		return over;
	}

	public void setOver(int over) {
		this.over = over;
	}

}
